<?php defined( 'BASEPATH' ) or die( 'Restricted' );
/*
This code is Copyright (C) by TMLA INC.  ALL RIGHTS RESERVED.
Please view license.txt in /tgsf_core/legal/license.txt or
http://tgWebSolutions.com/opensource/tgsf/license.txt
for complete licensing information.
*/
class tgsfParseFilterFactory
{
	public static function int() { return new tgsfParseFilterInt(); }
	public static function trim( $charList = " \n\t\r\0\x0B" ) { return new tgsfParseFilterTrim( $charList ); }
	public static function float() { return new tgsfParseFilterFloat(); }
}
//------------------------------------------------------------------------
abstract tgsfParseFilterBase extends tgsfBase
{
	abstract public function exec( $value );
	//------------------------------------------------------------------------
	/**
	* An empty filter - does not filter
	*/
	public function exec( $value )
	{
		return $value;
	}
}
//------------------------------------------------------------------------
class tgsfParseFilterInt extends tgsfParseFilterBase implements tgsfParseFilterInterface
{
	//------------------------------------------------------------------------
	/**
	* Executes the filter
	*/
	public function exec( $value )
	{
		return (int)$value;
	}
}
//------------------------------------------------------------------------
class tgsfParseFilterTrim extends tgsfParseFilterBase implements tgsfParseFilterInterface
{
	protected $_ro_characterList; // " \n\t\r\0\x0B"; // defaulted by passed param to constructor

	//------------------------------------------------------------------------
	/**
	* Constructor - accepts a character list
	* @param String - Optionally, the stripped characters can also be specified using the charlist parameter. Simply list all characters that you want to be stripped. With .. you can specify a range of characters.
	*/
	public function __construct( $charList = " \n\t\r\0\x0B" )
	{
		$this->_ro_characterList = $charList;
	}
	//------------------------------------------------------------------------
	/**
	*
	*/
	public function exec()
	{

	}
}

Cheri
651-495-2215